import 'package:get/route_manager.dart';
import 'package:xinxuan/views/blindBox/blind_box_confirm_order_page.dart';
import 'package:xinxuan/middleware/router_auth.dart';
import 'package:xinxuan/router/app_routers.dart';
import 'package:xinxuan/views/article/article_detail_page.dart';
import 'package:xinxuan/views/blindBox/blindBox_detail_page.dart';
import 'package:xinxuan/views/common_page.dart';
import 'package:xinxuan/views/cooperation/invitation_poster_page.dart';
import 'package:xinxuan/views/home/activity_good_page.dart';
import 'package:xinxuan/views/home/good_detail_page.dart';
import 'package:xinxuan/views/home/search_page.dart';
import 'package:xinxuan/views/home/search_record_page.dart';
import 'package:xinxuan/views/login/login_page.dart';
import 'package:xinxuan/views/my/about_us_page.dart';
import 'package:xinxuan/views/my/address/add_edit_address_page.dart';
import 'package:xinxuan/views/my/bank/bank_page.dart';
import 'package:xinxuan/views/my/bank/common_bank_page.dart';
import 'package:xinxuan/views/my/integral/integral_page.dart';
import 'package:xinxuan/views/my/pay_bank/add_pay_bank_error_page.dart';
import 'package:xinxuan/views/my/pay_bank/add_pay_bank_success_page.dart';
import 'package:xinxuan/views/my/pay_bank/pay_bank_detail_page.dart';
import 'package:xinxuan/views/my/receiving_bank/edit_receiving_bank_card_page.dart';
import 'package:xinxuan/views/my/address/address_area.dart';
import 'package:xinxuan/views/my/address/address_city.dart';
import 'package:xinxuan/views/my/address/address_list_page.dart';
import 'package:xinxuan/views/my/address/address_province.dart';
import 'package:xinxuan/views/my/authentication_page.dart';
import 'package:xinxuan/views/my/gift/gift_order_detail_page.dart';
import 'package:xinxuan/views/my/gift/gift_order_page.dart';
import 'package:xinxuan/views/my/gift/gift_page.dart';
import 'package:xinxuan/views/my/my_info_page.dart';
import 'package:xinxuan/views/my/recovery/recovery_page.dart';
import 'package:xinxuan/views/my/seckill_order/logistics_page.dart';
import 'package:xinxuan/views/my/seckill_order/seckill_order_page.dart';
import 'package:xinxuan/views/my/statistics/space_statistics_detail_page.dart';
import 'package:xinxuan/views/my/statistics/space_statistics_page.dart';
import 'package:xinxuan/views/my/store_order/conversion_picking_page.dart';
import 'package:xinxuan/views/my/store_order/pickUp_code_page.dart';
import 'package:xinxuan/views/my/store_order/store_order_detail_page.dart';
import 'package:xinxuan/views/my/store_order/store_order_page.dart';
import 'package:xinxuan/views/my/store_order/store_order_pay_success_detail_page.dart';
import 'package:xinxuan/views/my/update_password_page.dart';
import 'package:xinxuan/views/my/update_pay_passowrd_page.dart';
import 'package:xinxuan/views/my/upgrades_page.dart';
import 'package:xinxuan/views/my/seckill_order/seckill_order_detail_page.dart';
import 'package:xinxuan/views/my/writOff/write_off_page.dart';
import 'package:xinxuan/views/order/pay_success_page.dart';
import 'package:xinxuan/views/order/seckill_order_pay_page.dart';
import 'package:xinxuan/views/order/store_confirm_order_page.dart';
import 'package:xinxuan/views/order/store_order_pay_page.dart';
import 'package:xinxuan/views/seckill/seckill_detail_page.dart';
import 'package:xinxuan/views/seckill/seckill_page.dart';
import 'package:xinxuan/views/service/feedback_page.dart';
import 'package:xinxuan/views/start_page.dart';

class AppPages {

  static const START_PAGE = AppRouters.START_PAGE;

  static final List<GetPage> routers = [
    /// 启动页
    GetPage(
      name: AppRouters.START_PAGE, 
      page: () => StartPage(),
      transition: Transition.rightToLeft
    ),
    /// 主框
    GetPage(
      name: AppRouters.COMMON_PAGE, 
      page: () => CommonPage(),
      transition: Transition.rightToLeft,
      children: [
        /// 搜索页
        GetPage(
          name: AppRouters.SEARCH_PAGE, 
          page: () => SearchPage(),
          transition: Transition.rightToLeft,
          children: [
            /// 搜索详情页
            GetPage(
              name: AppRouters.SEARCH_RECORD_PAGE, 
              page: () => SearchRecordPage(),
              transition: Transition.rightToLeft
            ),
          ]
        ),
        /// 商品详情页
        GetPage(
          name: AppRouters.GOOD_DETAIL_PAGE, 
          page: () => GoodDetailPage(),
          transition: Transition.rightToLeft,
          children: [
            /// 确认订单
            GetPage(
              name: AppRouters.STORE_CONFIRM_ORDER_PAGE, 
              page: () => StoreConfirmOrderPage(),
              transition: Transition.rightToLeft,
              middlewares: [
                RouteAuthMiddleware()
              ],
              children: [
                /// 订单支付
                GetPage(
                  name: AppRouters.STORE_ORDER_PAY_PAGE, 
                  page: () => StoreOrderPayPage(),
                  transition: Transition.rightToLeft,
                  middlewares: [
                    RouteAuthMiddleware()
                  ],
                )
              ]
            )
          ]
        ),
        /// 登录页
        GetPage(
          name: AppRouters.LOGIN_PAGE, 
          page: () => LoginPage(),
          transition: Transition.rightToLeft
        ),
        /// 个人信息
        GetPage(
          name: AppRouters.MY_INFO_PAGE,
          page: () => MyInfoPage(),
          transition: Transition.rightToLeft,
          middlewares: [
            RouteAuthMiddleware()
          ],
          children: [
            /// 关于我们
            GetPage(
              name: AppRouters.ABOUT_US_PAGE, 
              page: () => AboutUsPage(),
              transition: Transition.rightToLeft
            ),
            /// 修改密码
            GetPage(
              name: AppRouters.UPDATE_PASSWORD_PAGE, 
              page: () => UpdatePasswordPage(),
              transition: Transition.rightToLeft,
              middlewares: [
                RouteAuthMiddleware()
              ],
            ),
            /// 实名认证
            GetPage(
              name: AppRouters.AUTHENTICATION_PAGE, 
              page: () => AuthenticationPage(),
              transition: Transition.rightToLeft,
              middlewares: [
                RouteAuthMiddleware()
              ],
            ),
            /// 地址列表
            GetPage(
              name: AppRouters.ADDRESS_LIST_PAGE, 
              page: () => AddressListPage(),
              transition: Transition.rightToLeft,
              middlewares: [
                RouteAuthMiddleware()
              ],
              children: [
                /// 添加、修改地址
                GetPage(
                  name: AppRouters.ADD_EDIT_ADDRESS_PAGE, 
                  page: () => AddEditAddressPage(),
                  transition: Transition.rightToLeft,
                  middlewares: [
                    RouteAuthMiddleware()
                  ],
                  children: [
                    GetPage(
                      name: AppRouters.ADDRESS_PROVINCE, 
                      page: () => AddressProvince(),
                      transition: Transition.rightToLeft,
                      middlewares: [
                        RouteAuthMiddleware()
                      ],
                    ),
                    GetPage(
                      name: AppRouters.ADDRESS_CITY, 
                      page: () => AddressCity(),
                      transition: Transition.rightToLeft,
                      middlewares: [
                        RouteAuthMiddleware()
                      ],
                    ),
                    GetPage(
                      name: AppRouters.ADDRESS_AREA, 
                      page: () => AddressArea(),
                      transition: Transition.rightToLeft,
                      middlewares: [
                        RouteAuthMiddleware()
                      ],
                    )
                  ]
                ),
              ]
            ),
            /// 修改支付密码
            GetPage(
              name: AppRouters.UPDATE_PAY_PASSWORD_PAGE, 
              page: () => UpdatePayPassowrdPage(),
              transition: Transition.rightToLeft,
              middlewares: [
                RouteAuthMiddleware()
              ],
            ),
            /// 银行卡管理
            GetPage(
              name: AppRouters.BANK_PAGE, 
              page: () => BankPage(),
              transition: Transition.rightToLeft,
              middlewares: [
                RouteAuthMiddleware()
              ],
              children: [
                /// 添加银行卡Common
                GetPage(
                  name: AppRouters.COMMON_BANK_PAGE, 
                  page: () => CommonBankPage(),
                  transition: Transition.rightToLeft,
                  middlewares: [
                    RouteAuthMiddleware()
                  ],
                  children: [
                    /// 绑定成功
                    GetPage(
                      name: AppRouters.ADD_PAY_BANK_SUCCESS_PAGE, 
                      page: () => AddPayBankSuccessPage(),
                      transition: Transition.rightToLeft
                    ),
                    /// 绑定失败
                    GetPage(
                      name: AppRouters.ADD_PAY_BANK_ERROR_PAGE, 
                      page: () => AddPayBankErrorPage(),
                      transition: Transition.rightToLeft
                    ),
                  ]
                ),
                /// 修改提现银行卡
                GetPage(
                  name: AppRouters.EDIT_RECEIVING_BANK_CARD_PAGE, 
                  page: () => EditReceivingBankCardPage(),
                  transition: Transition.rightToLeft,
                  middlewares: [
                    RouteAuthMiddleware()
                  ],
                ),
                /// 支付银行卡详情
                GetPage(
                  name: AppRouters.PAY_BANK_DETAIL_PAGE, 
                  page: () => PayBankDetailPage(),
                  transition: Transition.rightToLeft,
                  middlewares: [
                    RouteAuthMiddleware()
                  ],
                ),
              ]
            ),
          ]
        ),
        /// 商城订单
        GetPage(
          name: AppRouters.STORE_ORDER_PAGE, 
          page: () => StoreOrderPage(),
          transition: Transition.rightToLeft,
          middlewares: [
            RouteAuthMiddleware()
          ],
          children: [
            /// 订单详情
            GetPage(
              name: AppRouters.STORE_ORDER_DETAIL_PAGE, 
              page: () => StoreOrderDetailPage(),
              transition: Transition.rightToLeft,
              middlewares: [
                RouteAuthMiddleware()
              ],
            ),
            /// 订单详情
            GetPage(
              name: AppRouters.STORE_ORDER_PAY_SUCCESS_PAGE, 
              page: () => StoreOrderPaySuccessDetailPage(),
              transition: Transition.rightToLeft,
              middlewares: [
                RouteAuthMiddleware()
              ],
            ),
            /// 转提货
            GetPage(
              name: AppRouters.CONVERSION_PICKING_PAGE, 
              page: () => ConversionPickingPage(),
              transition: Transition.rightToLeft,
              middlewares: [
                RouteAuthMiddleware()
              ],
            ),
            /// 待提货
            GetPage(
              name: AppRouters.PICKUP_CODE_PAGE, 
              page: () => PickUpCodePage(),
              transition: Transition.rightToLeft,
              middlewares: [
                RouteAuthMiddleware()
              ],
            )
          ]
        ),
        /// 空间统计
        GetPage(
          name: AppRouters.SPACE_STATISTICS_PAGE, 
          page: () => SpaceStatisticsPage(),
          transition: Transition.rightToLeft,
          middlewares: [
            RouteAuthMiddleware()
          ],
          children: [
            /// 空间统计详情
            GetPage(
              name: AppRouters.SPACE_STATISTICS_DETAIL_PAGE, 
              page: () => SpaceStatisticsDetailPage(),
              transition: Transition.rightToLeft,
              middlewares: [
                RouteAuthMiddleware()
              ],
            )
          ]
        ),
        /// 活动商品页
        GetPage(
          name: AppRouters.ACTIVITY_GOOD_PAGE,
          page: () => ActivityGoodPage(),
          transition: Transition.rightToLeft
        ),
        /// 会员升级
        GetPage(
          name: AppRouters.UPGRADES_PAGE,
          page: () => UpgradesPage(),
          transition: Transition.rightToLeft,
          middlewares: [
            RouteAuthMiddleware()
          ],
        ),
        /// 文章详情
        GetPage(
          name: AppRouters.ARTICLE_DETAIL_PAGE,
          page: () => ArticleDetailPage(),
          transition: Transition.rightToLeft
        ),
        /// 反馈投诉
        GetPage(
          name: AppRouters.FEEDBACK_PAGE,
          page: () => FeedbackPage(),
          transition: Transition.rightToLeft,
          middlewares: [
            RouteAuthMiddleware()
          ],
        ),
        /// 海报邀请
        GetPage(
          name: AppRouters.INVITATION_POSTER_PAGE,
          page: () => InvitationPosterPage(),
          transition: Transition.rightToLeft,
          middlewares: [
            RouteAuthMiddleware()
          ],
        ),
        /// 抢购
        GetPage(
          name: AppRouters.SECKILL_PAGE,
          page: () => SeckillPage(),
          transition: Transition.rightToLeft,
          middlewares: [
            RouteAuthMiddleware()
          ],
          children: [
            /// 抢购详情
            GetPage(
              name: AppRouters.SECKILL_DETAIL_PAGE,
              page: () => SeckillDetailPage(),
              transition: Transition.rightToLeft,
              middlewares: [
                RouteAuthMiddleware()
              ],
            ),
          ]
        ),
        /// 盲盒详情
        GetPage(
          name: AppRouters.BLIND_BOX_DETAIL_PAGE,
          page: () => BlindBoxDetailPage(),
          transition: Transition.rightToLeft,
          middlewares: [
            RouteAuthMiddleware()
          ],
          children: [
            /// 盲盒确认订单
            GetPage(
              name: AppRouters.BLIND_BOX_CONFIRM_ORDER_PAGE,
              page: () => BlindBoxConfirmOrderPage(),
              transition: Transition.rightToLeft,
              middlewares: [
                RouteAuthMiddleware()
              ],
            )
          ]
        ),
        /// 抢购订单列表
        GetPage(
          name: AppRouters.SECKILL_ORDER_PAGE, 
          page: () => SeckillOrderPage(),
          transition: Transition.rightToLeft,
          middlewares: [
            RouteAuthMiddleware()
          ],
          children: [
            /// 抢购订单详情
            GetPage(
              name: AppRouters.SECKILL_ORDER_DETAIL_PAGE,
              page: () => SeckillOrderDetailPage(),
              transition: Transition.rightToLeft,
              middlewares: [
                RouteAuthMiddleware()
              ],
            ),
          ]
        ),
        /// 抢购订单支付
        GetPage(
          name: AppRouters.SECKILL_ORDER_PAY_PAGE, 
          page: () => SeckillOrderPayPage(),
          transition: Transition.rightToLeft,
          middlewares: [
            RouteAuthMiddleware()
          ],
        ),
        /// 回收列表
        GetPage(
          name: AppRouters.RECOVERY_PAGE, 
          page: () => RecoveryPage(),
          transition: Transition.rightToLeft,
          middlewares: [
            RouteAuthMiddleware()
          ],
        ),
        /// 赠品提交发货
        GetPage(
          name: AppRouters.GIFT_PAGE, 
          page: () => GiftPage(),
          transition: Transition.rightToLeft,
          middlewares: [
            RouteAuthMiddleware()
          ],
        ),
        /// 赠品订单
        GetPage(
          name: AppRouters.GIFT_ORDER_PAGE, 
          page: () => GiftOrderPage(),
          transition: Transition.rightToLeft,
          middlewares: [
            RouteAuthMiddleware()
          ],
          children: [
            /// 赠品订单详情
            GetPage(
              name: AppRouters.GIFT_ORDER_DETAIL_PAGE, 
              page: () => GiftOrderDetailPage(),
              transition: Transition.rightToLeft,
              middlewares: [
                RouteAuthMiddleware()
              ],
            )
          ]
        ),
        /// 支付成功
        GetPage(
          name: AppRouters.PAY_SUCCESS_PAGE, 
          page: () => PaySuccessPage(),
          transition: Transition.rightToLeft,
          middlewares: [
            RouteAuthMiddleware()
          ]
        ),
        /// 积分页面
        GetPage(
          name: AppRouters.INTEGRAL_PAGE, 
          page: () => IntegralPage(),
          transition: Transition.rightToLeft,
          middlewares: [
            RouteAuthMiddleware()
          ]
        ),
        /// 物流页面
        GetPage(
          name: AppRouters.LOGISTICS_PAGE, 
          page: () => LogisticsPage(),
          transition: Transition.rightToLeft,
          middlewares: [
            RouteAuthMiddleware()
          ]
        ),
        /// 提货券核销
        GetPage(
          name: AppRouters.WRITE_OFF_PAGE, 
          page: () => WriteOffPage(),
          transition: Transition.rightToLeft,
          middlewares: [
            RouteAuthMiddleware()
          ]
        ),
      ]
    )
  ];

}